

@RestController
@RequestMapping("/umsUser")
public class UmsUserController {

    @Resource
    private UmsUserService umsUserService;


    /**
     * 获取 UmsUser 分页列表
     */
    @GetMapping("/pagination")
    public Ret getUmsUserPagination( PaginationVo paginationVo, UmsUserQuery umsUserQuery ) throws Exception {
        IPage page = umsUserService.getUmsUserPagination(paginationVo, umsUserQuery );
        return Ret.toPage(page);
    }


    /**
     * 获取 UmsUser 所有数据
     */
    @GetMapping("/all")
    public Ret getUmsUserAllList( UmsUserQuery umsUserQuery ) throws Exception {
        List<UmsUserEntity> list = umsUserService.getUmsUserAllList( umsUserQuery );
        return Ret.ok(list);
    }



    /**
     * 获取 UmsUser 详情
    */
   @GetMapping("/{id}")
   public Ret getUmsUserDetail(@PathVariable Long id) throws Exception {

       UmsUserEntity umsUser = umsUserService.getUmsUserDetail(id);
       return Ret.ok(umsUser);
   }


    /**
     * 新增 UmsUser
     * */
    @PostMapping("")
    public Ret addUmsUser(@RequestBody UmsUserVo umsUserVo) throws Exception {

        umsUserService.addUmsUser(umsUserVo);
        return Ret.ok();
    }


    /**
     * 更新 UmsUser
     * */
    @PutMapping("")
    public Ret updateUmsUser(@RequestBody UmsUserVo umsUserVo) throws Exception {

        umsUserService.updateUmsUser(umsUserVo);
        return Ret.ok();
    }


    /**
     * 删除 UmsUser
     * */
    @PostMapping("/batchRemove")
    public Ret batchRemoveUmsUser( @RequestBody List<Long> ids ) throws Exception {

        umsUserService.batchRemoveUmsUser(ids);
        return Ret.ok();
    }
}

  